package controller;

import interfaces.IFCustomer;

import java.util.ArrayList;

import model.Customer;

import db.CustomerDb;


public class CustomerCtr implements IFCustomer {
	protected CustomerDb customerDb = new CustomerDb();

	@Override
	public ArrayList<Customer> getAllCustomers() throws Exception {
		return customerDb.getAllCustomers();
	}

	@Override
	public Customer searchCustomer(String name, String phoneNumber,
			String address, String country, String city)
			throws Exception {
		
		return customerDb.searchCustomer(name, phoneNumber, address, country, city);
	}

	@Override
	public ArrayList<Customer> searchCustomerList(String name,
			String phoneNumber, String address, String country, String city) throws Exception {
		return customerDb.searchCustomerList(name, phoneNumber, address, country, city);
	}

	@Override
	public void insertCustomer(String name, String phoneNumber, String address,
			String country, String city, int zipcode, int isCompany)
			throws Exception {
		customerDb.insertCustomer(name, phoneNumber, address, country, city, zipcode, isCompany);
		
	}

	@Override
	public void removeCustomer(String name, String phoneNumber, String address,
			String country, String city, int zipcode, int isCompany)
			throws Exception {
		customerDb.removeCustomer(name, phoneNumber, address, country, city, zipcode, isCompany);
	}

	
	
}
